<template>
    <van-nav-bar title="设置密码" left-text="" left-arrow @click-left="onClickLeft" />
    <van-form @submit="onSubmit">
        <van-cell-group inset>
            <van-field v-model="password" type="password" name="请输入密码" placeholder="请输入密码"
                :rules="[{ required: true, message: '请填写密码' }]" />
            <van-field v-model="password1" type="password" name="请再次输入密码" placeholder="请再次输入密码"
                :rules="[{ required: true, message: '请填写密码' }]" />
        </van-cell-group>
        <div style="margin: 16px;">
            <van-button round block type="primary" color="#df9464" native-type="submit" @submit="onSubmit">
                提交
            </van-button>
        </div>
    </van-form>
</template>

<script setup lang="ts">
import { ref } from 'vue';
import { useRouter } from "vue-router"
const router = useRouter()
const password = ref('');
const password1 = ref('');
const onSubmit = (values) => { router.push('/home') };
console.log('submit');

const onClickLeft = () => history.back()

</script>
<style lang="scss" scoped>
.mini {
    float: right;
    margin-bottom: 30px;
    margin-right: 20px;
}
</style>